/*--------------------------------------------------*/
/*VirtualSociety System ServiceModuleTemplate Class Body File*/
/*CreateBy SRPLab                */
/*CreateDate: 2011-3-29  */
/*--------------------------------------------------*/
#include "SRPSHtmlEnvEngine_VSClass.h"
ClassOfSHtmlEnvSiteClass::ClassOfSHtmlEnvSiteClass()
{
}

ClassOfSHtmlEnvSiteClass::ClassOfSHtmlEnvSiteClass(class ClassOfSRPInterface *In_SRPInterface)
{
    if( In_SRPInterface == NULL )
        return;
    WrapObject(In_SRPInterface,VS_TRUE,VS_FALSE,In_SRPInterface -> MallocObjectL(&VSOBJID_SHtmlEnvSiteClass,0,NULL));
}

ClassOfSHtmlEnvSiteClass::ClassOfSHtmlEnvSiteClass(class ClassOfSRPInterface *In_SRPInterface,void *SRPObject)
{
    if( In_SRPInterface == NULL )
        return;
    WrapObject(In_SRPInterface,VS_FALSE,VS_FALSE,SRPObject);
}

VS_CHAR *ClassOfSHtmlEnvSiteClass::GetSelfName()
{
    static VS_CHAR Buf[64];
    strcpy( Buf, "SHtmlEnvSiteClass" );
    return Buf;
}

class ClassOfSHtmlEnvSiteClass *ClassOfSHtmlEnvSiteClass::GetSRPWrap( class ClassOfSRPInterface *In_SRPInterface,void *SRPObject,VS_ULONG In_ClassLayer)
{
    class ClassOfSHtmlEnvSiteClass *ClassObject;

    if( SRPObject == NULL || In_SRPInterface == NULL )
        return NULL;
    if( In_ClassLayer == 0xFFFFFFFF )
        In_ClassLayer = In_SRPInterface -> GetLayer( SRPObject );
    ClassObject = (class ClassOfSHtmlEnvSiteClass *)In_SRPInterface -> GetAppClass( SRPObject, In_ClassLayer );
    if( ClassObject != NULL && strcmp( ((class ClassOfSRPObject *)ClassObject) -> GetSelfName(), "SHtmlEnvSiteClass" ) == 0 )
        return ClassObject;
    ClassObject = new class ClassOfSHtmlEnvSiteClass();
    ClassObject -> WrapObject(In_SRPInterface,VS_FALSE,VS_TRUE,SRPObject, In_ClassLayer);
    return ClassObject;
}

VS_VSTRING ClassOfSHtmlEnvSiteClass::Get_RootUrl()
{
    return ((struct StructOfSHtmlEnvSiteClass *)ThisSRPObject) -> RootUrl;
}
void ClassOfSHtmlEnvSiteClass::Put_RootUrl(VS_VSTRING In_Value)
{
    ThisSRPInterface -> ChangeObject(ThisSRPObject,VSATTRINDEX_SHTMLENVSITECLASS_ROOTURL,(VS_INT8 *)In_Value.Buf);
}

VS_BOOL ClassOfSHtmlEnvSiteClass::Get_CaseSensitive()
{
    return ((struct StructOfSHtmlEnvSiteClass *)ThisSRPObject) -> CaseSensitive;
}
void ClassOfSHtmlEnvSiteClass::Put_CaseSensitive(VS_BOOL In_Value)
{
    ThisSRPInterface -> ChangeObject(ThisSRPObject,VSATTRINDEX_SHTMLENVSITECLASS_CASESENSITIVE,(VS_INT8 *)&In_Value);
}

VS_INT32 ClassOfSHtmlEnvSiteClass::Get_ActiveNumber()
{
    return ((struct StructOfSHtmlEnvSiteClass *)ThisSRPObject) -> ActiveNumber;
}
void ClassOfSHtmlEnvSiteClass::Put_ActiveNumber(VS_INT32 In_Value)
{
    ThisSRPInterface -> ChangeObject(ThisSRPObject,VSATTRINDEX_SHTMLENVSITECLASS_ACTIVENUMBER,(VS_INT8 *)&In_Value);
}

VS_INT32 ClassOfSHtmlEnvSiteClass::Get_MaxUploadSize()
{
    return ((struct StructOfSHtmlEnvSiteClass *)ThisSRPObject) -> MaxUploadSize;
}
void ClassOfSHtmlEnvSiteClass::Put_MaxUploadSize(VS_INT32 In_Value)
{
    ThisSRPInterface -> ChangeObject(ThisSRPObject,VSATTRINDEX_SHTMLENVSITECLASS_MAXUPLOADSIZE,(VS_INT8 *)&In_Value);
}

void ClassOfSHtmlEnvSiteClass::Put_F_C_OnDefault(void * In_Value)
{
    ThisSRPInterface -> CreateOVLFunction(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_OnDefault,In_Value,NULL);
}
void * ClassOfSHtmlEnvSiteClass::Get_F_C_OnDefault()
{
    return NULL;
}


void SRPAPI ClassOfSHtmlEnvSiteClass::C_Mount(VS_CHAR * RootUrl,VS_CHAR * LocalPathOrFile,void *CallBackFunction)
{
    SHtmlEnvSiteClass_C_MountProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_MountProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_Mount);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl,LocalPathOrFile,CallBackFunction);
}
void SRPAPI ClassOfSHtmlEnvSiteClass::C_UnMount(VS_CHAR * RootUrl,VS_CHAR * LocalPathOrFile)
{
    SHtmlEnvSiteClass_C_UnMountProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_UnMountProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_UnMount);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl,LocalPathOrFile);
}
void SRPAPI ClassOfSHtmlEnvSiteClass::C_MountBuf(VS_CHAR * RootUrl,void *BinBuf,VS_CHAR * ContentType,VS_UINT32 TimeToLive,void *CallBackFunction)
{
    SHtmlEnvSiteClass_C_MountBufProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_MountBufProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_MountBuf);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl,BinBuf,ContentType,TimeToLive,CallBackFunction);
}
void SRPAPI ClassOfSHtmlEnvSiteClass::C_UnMountBuf(VS_CHAR * RootUrl)
{
    SHtmlEnvSiteClass_C_UnMountBufProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_UnMountBufProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_UnMountBuf);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl);
}
void SRPAPI ClassOfSHtmlEnvSiteClass::C_MountObject(VS_CHAR * RootUrl,VS_OBJPTR EntityObject,void *CallBackFunction)
{
    SHtmlEnvSiteClass_C_MountObjectProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_MountObjectProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_MountObject);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl,EntityObject,CallBackFunction);
}
void SRPAPI ClassOfSHtmlEnvSiteClass::C_UnMountObject(VS_CHAR * RootUrl)
{
    SHtmlEnvSiteClass_C_UnMountObjectProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_UnMountObjectProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_UnMountObject);
    if( LocalProc != NULL )
        LocalProc(ThisSRPObject,RootUrl);
}
VS_BOOL SRPAPI ClassOfSHtmlEnvSiteClass::C_SendResponse(VS_ULONG ConnectionID,void *RetHeader,void *RetBody)
{
    SHtmlEnvSiteClass_C_SendResponseProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_SendResponseProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_SendResponse);
    if( LocalProc != NULL )
        return LocalProc(ThisSRPObject,ConnectionID,RetHeader,RetBody);
    else{
        VS_BOOL LocalReturnValue = VS_FALSE;

        return LocalReturnValue;
    }
}
VS_CHAR * SRPAPI ClassOfSHtmlEnvSiteClass::C_GetParentUrl(VS_OBJPTR EntityObject)
{
    SHtmlEnvSiteClass_C_GetParentUrlProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_GetParentUrlProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_GetParentUrl);
    if( LocalProc != NULL )
        return LocalProc(ThisSRPObject,EntityObject);
    else{
        VS_CHAR * LocalReturnValue = NULL;

        return LocalReturnValue;
    }
}
VS_BOOL SRPAPI ClassOfSHtmlEnvSiteClass::C_GetChildBody(VS_OBJPTR ChildEntityObject,void *RetBody)
{
    SHtmlEnvSiteClass_C_GetChildBodyProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_GetChildBodyProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_GetChildBody);
    if( LocalProc != NULL )
        return LocalProc(ThisSRPObject,ChildEntityObject,RetBody);
    else{
        VS_BOOL LocalReturnValue = VS_FALSE;

        return LocalReturnValue;
    }
}
VS_INT32 SRPAPI ClassOfSHtmlEnvSiteClass::C_OnDefault(void *CommInterface,void *HttpOnRequest,VS_BINBUFPTR RetHeader,VS_BINBUFPTR RetBody)
{
    SHtmlEnvSiteClass_C_OnDefaultProc LocalProc;

    LocalProc = (SHtmlEnvSiteClass_C_OnDefaultProc)ThisSRPInterface -> GetFunctionEx(ThisSRPObject,&VSFUNCID_SHtmlEnvSiteClass_C_OnDefault);
    if( LocalProc != NULL )
        return LocalProc(ThisSRPObject,CommInterface,HttpOnRequest,RetHeader,RetBody);
    else{
        VS_INT32 LocalReturnValue = 0;

        return LocalReturnValue;
    }
}

/*--------------------------------------------------*/
